﻿using DeviceMaintainGIS.BLL;
using DeviceMaintainGIS.Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace DeviceMaintainGIS.Controllers
{
    /// <summary>
    /// 文件操作
    /// </summary>
    public class FileController : ApiController
    {

        /// <summary>
        /// 文件删除
        /// </summary>
        /// <param name="obj"></param>
        // POST: api/File
        public ReturnMessageVM Post([FromBody]dynamic obj)
        {
            ReturnMessageVM rmm = new ReturnMessageVM();
            string strUrl = obj.fileUrl;
            string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, strUrl);
            rmm = new CommonsService().DelImageFile(filePath);
            return rmm;
        }

    }
}
